<template>
  <div class="goods-desc">
        <van-nav-bar
      title="图文介绍"
      left-text="返回"
      left-arrow
      @click-left="$router.go(-1)"
      class="fixed-top"
    />
    <div class="desc-box">
      <h3 class="desc-title">{{imgRecommend.title}}</h3>
      <div class="desc-content" v-html="imgRecommend.content"></div>
    </div>
  </div>
</template>
<script>
import { getDityImgDetail } from '@/api'
export default {
  data () {
    return {
      id: this.$route.params.id,
      imgRecommend: {}
    }
  },
  created () {
    this.initImg()
  },
  methods: {
    initImg () {
      getDityImgDetail(this.id)
        .then(res => {
          console.log(res)
          this.imgRecommend = res.data.message[0]
        })
    }
  }
}
</script>
<style>
    .gomeImgLoad {
    width: 100% !important;
    height: 100% !important;
  }
  td {
    display: block !important;
  }
  table {
    width: 100% !important;
  }
</style>
<style lang="scss" scoped>
.goods-desc {
  h3 {
    font-weight: bold;
    color: #26a2ff;
    font-size: 16px;
    margin-bottom: 5px;
  }
  .desc-box {
    padding: 0 8px;
  }
  .desc-content {
    font-size: 14px;
  }
}
</style>
